<%@ include file="/WEB-INF/jspf/tag-libraries.jspf"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<ttjhome:bundle basename="companies/companies" />
<ttjhome:resource basename="companies/companies" bundle="errorBundle" scope="request" />
<ttjhome:rewrite var="editURL" action="/companies/edit.do?action=edit" />
<script type="text/javascript">

</script>


<div class="toolBody">
	<div id="error" class="couponErrMsg">
		<tiles:insert definition="errors-page-header">
			<tiles:put name="errorStyle" value="err-msg" />
			<tiles:put name="errorIcon" value="/include/img/error-sign-sm.gif" />
		</tiles:insert>
	</div>


	<h2 class="toolH2">Companies</h2>
	<div class="candidatesList">
	<div class="leftCol">&nbsp;</div>


	<c:if test="${companiesCount>0}">
		<display:table requestURI="/companies/list.do?action=list" name="companiesList" pagesize="5" sort="external" class="candidatesTable" id="company" partialList="true" size="${companiesCount}">
			<display:setProperty name="paging.banner.onepage" value="" />
			<display:setProperty name="paging.banner.first" value="<span class='pagelinks'><span class='pageunselected'>${pageFirst}</span> <span class='pageunselected'>${pagePrev}</span> {0} <a href={3}>${pageNext}</a> <a href={4}>${pageLast}</a></span>" />
			<display:setProperty name="paging.banner.last" value="<span class='pagelinks'><a href={1}>${pageFirst}</a> <a href={2}>${pagePrev}</a> {0} <span class='pageunselected'>${pageNext}</span> <span class='pageunselected'>${pageLast}</span></span>" />
			<display:setProperty name="paging.banner.full" value="<span class='pagelinks'><a href={1}>${pageFirst}</a> <a href={2}>${pagePrev}</a> {0} <a href={3}>${pageNext}</a> <a href={4}>${pageLast}</a></span>" />
			<display:setProperty name="paging.banner.page.selected" value="<span class='pageselected'>{0}</span>" />
			<display:setProperty name="paging.banner.page.separator" value="&nbsp;" />
			<display:setProperty name="paging.banner.placement" value="both" />			
			<display:setProperty name="paging.banner.some_items_found" value="<span class='ptext'>Candidates {2} to {3}</span>" />
			<c:choose>
				<c:when test="${companiesCount>1}">
					<display:setProperty name="paging.banner.all_items_found" value="<span class='ptext'>find all</span>" />
				</c:when>
				<c:otherwise >
					<display:setProperty name="paging.banner.all_items_found" value="" />
				</c:otherwise>
			</c:choose>
			
			<fmt:message key="company.name" var="companyName"/>
			<display:column  title="${companyName}"   >
				<div ><a  href="javascript: void(0)" onclick="javascript:location.href='${editURL}&companyID=${company.id}';return false;">${company.name}</a></div>
			</display:column>	
			<fmt:message key="company.poc" var="companyPOC"/>
			<display:column  title="${companyPOC}"    >
				<div >${company.poc}</div>
			</display:column>	
			<fmt:message key="company.mailbox" var="companyMailBox"/>
			<display:column  title="${companyMailBox}" >
				<div >${company.mailBox}</div>
			</display:column>
			<fmt:message key="company.phoneNumber" var="companyPhoneNumber"/>
			<display:column  title="${companyPhoneNumber}" >
				<div >${company.phoneNumber}</div>
			</display:column>
			<fmt:message key="company.address" var="companyAddress"/>
			<display:column  title="${companyAddress}" >
				<div >${company.address}</div>
			</display:column>	
	
		</display:table>
	</c:if>
</div>
</div>
